package about_attributes.demo1;

/**
 * @author yuisama
 * @date 2022/09/28 21:12
 **/
public class Main2 {
    static class MyThread extends Thread{
        @Override
        public void run() {
            System.out.println(this.getName());
        }
    }

    public static void main(String[] args) {
        Thread thread = Thread.currentThread();//当前线程
        System.out.println(thread.getName());


        //这两个被调度的可能性是相同的，没有先后顺序
        MyThread t1 = new MyThread();
        t1.start();

        MyThread t2 = new MyThread();
        t2.start();
    }
}

